﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SecurityApi.Business;
using SecurityApi.DataAccess;

namespace SecurityApi.UnitTest
{
    [TestClass]
    public class RESTApiTest
    {

        [TestCategory("REST API")]
        [TestMethod()]
        public async Task GetUserApplicationsTest()
        {
            ApplicationSecurityManager mgr = new ApplicationSecurityManager();

            List<SecurityApi.Model.Application> list = await mgr.GetApplicationModules("user1@codeplex.com");
        }


        [TestCategory("REST API")]
        [TestMethod()]
        public async Task VerifyUserTest()
        {
            ApplicationSecurityManager mgr = new ApplicationSecurityManager();
            string userName = @"user1@codeplex.com";
            string password = @"T@p$ecret2010";
            int enterpriseId = 1;

            bool result = await mgr.VerifyUser(userName,password,enterpriseId);
        }


    }
}
